<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>消息详情</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta http-equiv="Cache-Control" content="no-transform">
		<meta name="format-detection" content="telephone=no">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<link rel="stylesheet" href="style/css/basic.css">
		<link rel="stylesheet" href="style/css/my.css" />
		<script type="text/javascript" src="style/plugin/mui/js/mui.min.js"></script>
		<script type="text/javascript" src="style/js/jquery-1.8.3.min.js" ></script>
		<script type="text/javascript" src="style/mockjs/dist/mock.js"></script>
		<script type="text/javascript" src="style/js/vue.min.js"></script>
		<script type="text/javascript" src="style/js/vue-resource.js"></script>
		<script type="text/javascript" src="style/js/basic.js"></script>
	</head>

	<body style="background:#fff">
		<div id=messageDetail>
		    <!--header-->
			<div id="header">
				<h1>消息详情</h1>
				<span class="backicon"></span>
			</div>
			<!--content-->
			<div class="body ">
				<div class="message_details" v-if="msgdel!=''">
					<h2>【{{msgdel.title}}】</h2> 
					<div class="message_info">
						<div>订单号：<span class="title">{{orderno.order_no}}</span></div>
						<div>{{msgdel.content}}</div>
						<div>时间：<span>{{fTime(msgdel.create_time)}}</span></div>
					</div>
	
				</div>
	
			</div>	
		</div>
		<script>
			new Vue({
				el:"#messageDetail",
				data:{
					msgdel:"",
					ticket:"",
				    sign:""
					
				},
				methods:{
					fTime:function(timestamp){
	                	if (typeof timestamp == "undefined") {
					        timestamp = Math.round(new Date().getTime() / 1000)
					    }
					    var n = parseInt(timestamp) * 1000
					    var date = new Date(n);
					    var Y = date.getFullYear() + '-';
					    var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
					    var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
					    var H=date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
					    var Min=date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
					    var S=date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
					    return (Y + M + D)
	                }
				},
				created:function(){
					var that=this;
					that.ticket=localStorage.getItem("tick")
                    that.sign=localStorage.getItem("sig")
					mui.plusReady(function(){
						var revId=plus.webview.currentWebview().current//获取参数
//						alert(revId)
						//请求消息详情
						that.$http.post(domain+"/member_msg/getInfo?t="+that.ticket+"&sign="+that.sign,{id:revId},{emulateJSON:true}).then( 
				            function (res) {
				                // 处理成功的结果
				                if(res.body.code==1){
				                  console.log(res.body)	
				                  that.msgdel=res.body.data;
				                  that.orderno=JSON.parse(that.msgdel.variable)
				                } 
				            },function (res) {
				            // 处理失败的结果
				            console.log(res) 
				            }
				        );
					})
				}
			})
		</script>
	</body>

</html>